import os

def readData(src,dst=""):
    with open("idx.txt","w") as f:
        for s in os.listdir(src):
            path = os.path.join(src,s)
            if(os.path.isfile(path)):
                if(path.endswith(".bgr")):
                    f.write(path+"\n")

def main():
    src = "data"
    readData(src)

if __name__ == "__main__":
    main()
